给定以下python字典列表:results=[[{'id':'001','result':[0,0,0,0,1]},{'id':'002','result':[1,1,1,1,1]},{'id':'003','result':[0,1,1,None,None]},{'id':'004','result':[0,None,None,1,0]},{'id':'005','result':[1,0,None,1,1]},{'id':'006','result':[0,0,0,1,1]}],[{'id':'001','result':[1,0,1,0,1]},{'id':'002','res
我尝试读取一个目录并从文件条目中生成一个JSON字符串。但是json.encoder.Encode()函数只返回空对象。为了测试,我在tmp目录中有两个文件:test1.jstest2.jsgo程序是这样的:packagemainimport("encoding/json""fmt""os""path/filepath""time")typeFilestruct{namestringtimeStampint64}funcmain(){files:=make([]File,0,20)filepath.Walk("/home/michael/tmp/",func(pathstring,fo